package com.matrix.java.chap_07;

import java.util.Scanner;

/*
    分析成绩
 */
public class Ex7_04 {
    public static void main(String[] args) {
        double[] counts = new double[100];
        Scanner input = new Scanner(System.in);
        System.out.print("输入:");
        int score = input.nextInt();
        double stuNum = 0;
        double scoreSum = 0;
        while (score > 0) {
            counts[score - 1]++;
            scoreSum += score;
            stuNum++;
            score = input.nextInt();
        }
        input.close();

        double avg = scoreSum / stuNum;
        int sumSmall = 0;
        for (int i = 0; i < avg - 1; i++) {
            sumSmall += counts[i];
        }

        System.out.println("smallNum: " + sumSmall);
        System.out.println("bigNum: " + (int) (stuNum - sumSmall));
    }
}
